import React from 'react';
import Route from 'react-router/lib/Route';

import Home from './components/Home';
import SendSms from './components/SendSms';
import SmsBatchImport from './components/SmsBatchImport';
import SmsRegular from './components/SmsRegular';
import MySms from './components/MySms';
import AllSms from './components/AllSms';
import SmsReport from './components/SmsReport';
import SmsTemplate from './components/SmsTemplate';
import SmsRadio from './components/SmsRadio';
import RadioDialog from './components/RadioDialog';
import RadioDetail from './components/RadioDetail';
import './style/index';
import stores from './stores';
import { WeaLocaleProvider } from 'ecCom';

const getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'sms');

const SmsRoute = (
  <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@phfxs5`} name="sms" breadcrumbName="短信" path="sms" component={Home} onEnter={getLocaleLabel}>
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@c0b27p`} name="sendSms" breadcrumbName="发送短信" path="sendSms" component={SendSms} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@4pe5k2`} name="smsBatchImport" breadcrumbName="批量导入发送短信" path="smsBatchImport" component={SmsBatchImport} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@qmppxr`} name="smsRegular" breadcrumbName="定时发送短信列表" path="smsRegular" component={SmsRegular} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@jkxk1c`} name="mySms" breadcrumbName="我的短信" path="mySms" component={MySms} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@7etmmi`} name="allSms" breadcrumbName="短信管理" path="allSms" component={AllSms} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@jphqbq`} name="smsReport" breadcrumbName="短信时间报表" path="smsReport" component={SmsReport} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@rtgork`} name="smsTemplate" breadcrumbName="短信消息模板" path="smsTemplate" component={SmsTemplate} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@j498sz`} name="smsRadio" breadcrumbName="广播消息" path="smsRadio" component={SmsRadio} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@0syes4`} name="radioDialog" breadcrumbName="消息中心广播弹窗" path="radioDialog" component={RadioDialog} />
    <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@6l0lse`} name="radioDetail" breadcrumbName="广播详情" path="radioDetail" component={RadioDetail} />
  </Route>
);

module.exports = {
  Route: SmsRoute,
  stores,
};
